package example.pattern.strategy;

public enum StrategyContext {
	ADD(new AddStrategy()), 
	SUBSTRACT(new SubstractStrategy()), 
	MULTIPLY(new MultiplyStrategy());
	
	
	private Strategy strategy;
	
	private StrategyContext(Strategy strategy) {
		this.strategy = strategy;
	}
	
	public int executeStrategy(int a, int b){
		return this.strategy.calculate(a, b);
	}

}
